<?php

$url="https://m.cjcp.com.cn/kaijiang/tjssc/";

$cont=file_get_contents($url);

$data=array();

if (preg_match('%<div class="kj_num public_num">(.*?)</div>%s', $cont,$matches)) {
	//print_r($matches[0]);
	if (preg_match_all('%<span class="qiu_red">(\d{1,5})</span>%s', $matches[0] ,$result)) {
		//print_r($result[1]);
		$data['opencode']=implode(',',$result[1]);
	} else {
		echo 11111;
	}
	
	if (preg_match('/(\d{10,15})/s', $matches[0] , $qishu)) {
		//print_r($qishu[0]);
		$data['expect']=$qishu[0];
	} else {
		echo 2222;
	}
	$data['opentime']=date("Y-m-d H:i:s",time())	;
} else {
	echo 3333;
}

//print_r($data);

header('Content-type:application/xml');
echo '<?xml version="1.0" encoding="utf-8" ?>';
echo '<xml> <row expect="'.$data['expect'].'"  opencode="'.$data['opencode'].'"   opentime="'.$data['opentime'].'" /> </xml>';

?>